def find_error_combinations(total, error_values):
    dp = [[] for _ in range(int(total) + 1)]
    dp[0] = [[]]  # 初始状态，总额为0时只有一种组合，即空组合

    for value in error_values:
        print(value)
        for i in range(int(total), int(value) - 1, -1):
            for combo in dp[i - int(value)]:
                dp[i].append(combo + [value])

    return dp[int(total)]

# 错误总额和错误金额数组
total = 656.63
# total = 61916.02
error_values = [3.57, 5.93, 17.95, 34.08, 43.3, 50.82, 92.94, 97.91, 167.85, 189.26, 227.04, 266.29, 269.3, 272.11, 276.81, 303.45, 322.33, 369.24, 439.68, 607.4, 634.17, 1219.07, 1220.6, 1476.96, 2578.64, 2598.0, 3500.9, 3524.76, 4251.8, 4531.95]
# error_values = [3.57, 5.93, 17.95, 34.08, 43.3, 50.82, 92.94, 97.91, 167.85, 189.26, 227.04, 266.29, 269.3, 272.11, 276.81, 303.45, 322.33, 369.24, 439.68, 607.4, 634.17, 1219.07, 1220.6, 1476.96, 2578.64, 2598.0, 3500.9, 3524.76, 4251.8, 4531.95, 4625.87, 4767.84, 5110.02, 19007.05, 27659.91, 32439.51, 34236.54, 35114.62, 53621.04, 57430.68, 61772.26, 65280.54, 163034.05, 218246.19]
error_values.sort(reverse=True)
# 调用函数并打印结果
combinations = find_error_combinations(total, error_values)
for combo in combinations:
    print(combo)